home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / commontex / c / mathlists < prev    next >
Encoding:
Text File  |  1988-04-08  |  15.3 KB  |  772 lines

  1. /*
  2.  *    Copyright 1986, 1987 Pat Joseph Monardo. All rights reserved.
  3.  *    Copying of this file is granted according to the provisions 
  4.  *    specified in the file COPYING which must accompany this file.
  5.  */
  6.  
  7.  
  8. /*
  9.  *        mathlists.c
  10.  */
  11.  
  12. #include "tex.h"
  13. #include "cmds.h"
  14. #include "heap.h"
  15. #include "arith.h"
  16. #include "eq.h"
  17. #include "eqstack.h"
  18. #include "evalstack.h"
  19. #include "token.h"
  20. #include "tokenstack.h"
  21. #include "scan.h"
  22. #include "tfm.h"
  23. #include "box.h"
  24. #include "pack.h"
  25. #include "math.h"
  26. #include "mlisthlist.h"
  27. #include "par.h"
  28. #include "page.h"
  29. #include "print.h"
  30. #include "error.h"
  31. #include "mathlists.h"
  32.  
  33. push_math (c)
  34.     group    c;
  35. {
  36.     push_nest();
  37.     mode = -MMODE;
  38.     incompleat_noad = NULL;
  39.     new_save_level(c);
  40. }
  41.  
  42. init_math ()
  43. {
  44.     scal    d;
  45.     fnt        f;
  46.     scal    l;
  47.     int        n;
  48.     ptr        p;
  49.     ptr        q;
  50.     scal    s;
  51.     scal    v;
  52.     scal    w;
  53.  
  54.     get_token();
  55.     if (cur_cmd == MATH_SHIFT && mode > 0) {
  56.         if (head == tail) {
  57.             pop_nest();
  58.             w = -MAX_DIMEN;
  59.         } else {
  60.             line_break(display_widow_penalty);
  61.             v = shift_amount(just_box) + 2 * quad(cur_font);
  62.             w = -MAX_DIMEN;
  63.             p = list_ptr(just_box);
  64.             while (p != NULL) {
  65.         reswitch:
  66.                 if (is_char_node(p)) {
  67.                     f = font(p);
  68.                     d = char_width(f, char_info(f, character(p)));
  69.                     goto found;
  70.                 }
  71.                 switch (type(p))
  72.                 {
  73.                 case HLIST_NODE:
  74.                 case VLIST_NODE:
  75.                 case RULE_NODE:
  76.                     d = width(p);
  77.                     goto found;
  78.                     break;
  79.                 
  80.                 case LIGATURE_NODE:
  81.                     make_char_from_lig();
  82.                     goto reswitch;
  83.                     break;
  84.                 
  85.                 case KERN_NODE:
  86.                 case MATH_NODE:
  87.                     d = width(p);
  88.                     break;
  89.  
  90.                 case GLUE_NODE:
  91.                     q = glue_ptr(p);
  92.                     d = width(q);
  93.                     if (glue_sign(just_box) == STRETCHING) {
  94.                         if (glue_order(just_box) == stretch_order(q) &&
  95.                             stretch(q) != 0)
  96.                             v = MAX_DIMEN;
  97.                     } else if (glue_sign(just_box) == SHRINKING)  {
  98.                         if (glue_order(just_box) == shrink_order(q) &&
  99.                             shrink(q) != 0) 
  100.                             v = MAX_DIMEN;
  101.                     }
  102.                     if (subtype(p) >= A_LEADERS)    
  103.                         goto found;
  104.                     break;
  105.  
  106.                 case WHATSIT_NODE: 
  107.                     d = 0;
  108.                     break;
  109.  
  110.                 default:
  111.                     d = 0;
  112.                     break;
  113.                 }
  114.                 if (v < MAX_DIMEN)
  115.                     v += d;
  116.                 goto not_found;
  117.             
  118.             found:
  119.                 if (v < MAX_DIMEN) {
  120.                     v += d;
  121.                     w = v;
  122.                 } else {
  123.                     w = MAX_DIMEN;
  124.                     break;
  125.                 }
  126.  
  127.             not_found:
  128.                 p = link(p);
  129.             }
  130.         }
  131.         if (par_shape_ptr == NULL) {
  132.             if (hang_indent != 0 &&
  133.                 (hang_after >= 0 &&
  134.                 prev_graf + 2 > hang_after ||
  135.                 prev_graf + 1 < -hang_after)) {
  136.                 l = hsize - abs(hang_indent);
  137.                 s = (hang_indent > 0) ? hang_indent : 0;
  138.             } else {
  139.                 l = hsize;
  140.                 s = 0;
  141.             }
  142.         } else {
  143.             n = info(par_shape_ptr);
  144.             if (prev_graf + 2 >= n)
  145.                 p = par_shape_ptr + 2 * n;
  146.             else p = par_shape_ptr + 2 * (prev_graf + 2);
  147.             s = mem[p - 1].sc;
  148.             l = mem[p].sc;
  149.         }
  150.         push_math(MATH_SHIFT_GROUP);
  151.         mode = MMODE;
  152.         eq_word_define(INT_BASE + CUR_FAM_CODE, -1L);
  153.         eq_word_define(DIMEN_BASE + PRE_DISPLAY_SIZE_CODE, w);
  154.         eq_word_define(DIMEN_BASE + DISPLAY_WIDTH_CODE, l);
  155.         eq_word_define(DIMEN_BASE + DISPLAY_INDENT_CODE, s);
  156.         if (every_display != NULL)
  157.             begin_token_list(every_display, EVERY_DISPLAY_TEXT);
  158.         if (nest_ptr == 1)
  159.             build_page();
  160.     } else {
  161.         back_input(); 
  162.         push_math(MATH_SHIFT_GROUP);
  163.         eq_word_define(INT_BASE + CUR_FAM_CODE, -1L);
  164.         if (every_math != NULL)
  165.             begin_token_list(every_math, EVERY_MATH_TEXT);
  166.     }
  167. }
  168.  
  169. start_eq_no ()
  170. {
  171.     saved(0) = cur_chr;
  172.     incr(save_ptr);
  173.     push_math(MATH_SHIFT_GROUP);
  174.     eq_word_define(INT_BASE + CUR_FAM_CODE, -1L);
  175.     if (every_math != NULL)
  176.         begin_token_list(every_math, EVERY_MATH_TEXT);
  177. }
  178.  
  179. #define    fam_in_range()     (cur_fam >= 0 && cur_fam < 16)
  180.  
  181. scan_math (p)
  182.     ptr        p;
  183. {
  184.     int        c;
  185.  
  186. restart:
  187.     get_nbrx_token();
  188.  
  189. reswitch:
  190.     switch (cur_cmd)
  191.     {
  192.     case LETTER:
  193.     case OTHER_CHAR:
  194.     case CHAR_GIVEN:
  195.         if (cur_chr >= 128)
  196.             c = cur_chr;
  197.         else {
  198.             c = ho(math_code(cur_chr));
  199.             if (c == 0100000) {
  200.                 cur_cs = cur_chr + ACTIVE_BASE;
  201.                 cur_cmd = eq_type(cur_cs);
  202.                 cur_chr = equiv(cur_cs);
  203.                 x_token();
  204.                 back_input();
  205.                 goto restart;
  206.             }
  207.         }
  208.         break;
  209.     
  210.     case CHAR_NUM:
  211.         scan_char_num();
  212.         cur_chr = cur_val;
  213.         cur_cmd = CHAR_GIVEN;
  214.         goto reswitch;
  215.         break;
  216.     
  217.     case MATH_CHAR_NUM:
  218.         scan_fifteen_bit_int();
  219.         c = cur_val;
  220.         break;
  221.  
  222.     case MATH_GIVEN:
  223.         c = cur_chr;
  224.         break;
  225.         
  226.     case DELIM_NUM:
  227.         scan_twenty_seven_bit_int();
  228.         c = cur_val / 010000;
  229.         break;
  230.  
  231.     default:
  232.         back_input();
  233.         scan_left_brace();
  234.         saved(0) = p;
  235.         incr(save_ptr);
  236.         push_math(MATH_GROUP);
  237.         return;
  238.         break;
  239.     }
  240.     math_type(p) = MATH_CHAR;
  241.     character(p) = c % 256;
  242.     if (c >= VAR_CODE && fam_in_range())
  243.         fam(p) = cur_fam;
  244.     else fam(p) = (c / 256) % 16;
  245. }
  246.  
  247. set_math_char (c)
  248.     val        c;
  249. {
  250.     ptr        p;
  251.  
  252.     if (c >= 0100000) {
  253.         cur_cs = cur_chr + ACTIVE_BASE;
  254.         cur_cmd = eq_type(cur_cs);
  255.         cur_chr = equiv(cur_cs);
  256.         x_token();
  257.         back_input();
  258.     } else {
  259.         p = new_noad();
  260.         math_type(nucleus(p)) = MATH_CHAR;
  261.         character(nucleus(p)) = c % 256;
  262.         fam(nucleus(p)) = (c / 256) % 16;
  263.         if (c >= VAR_CODE) {
  264.             if (fam_in_range())
  265.                 fam(nucleus(p)) = cur_fam;
  266.             type(p) = ORD_NOAD;
  267.         } else type(p) = ORD_NOAD + (c / 010000);
  268.         link(tail) = p;
  269.         tail = p;
  270.     }
  271. }
  272.  
  273. math_limit_switch ()
  274. {
  275.     if (head != tail && type(tail) == OP_NOAD) {
  276.         subtype(tail) = cur_chr;
  277.         return;
  278.     }
  279.     print_err("Limit controls must follow a math operator");
  280.     help_limits();
  281.     error();
  282. }
  283.  
  284. scan_delimiter (p, r)
  285.     ptr        p;
  286.     bool    r;
  287. {
  288.     if (r)
  289.         scan_twenty_seven_bit_int();
  290.     else {
  291.         get_nbrx_token();
  292.         switch (cur_cmd) 
  293.         {
  294.         case LETTER:
  295.         case OTHER_CHAR:
  296.             cur_val = del_code(cur_chr);
  297.             break;
  298.  
  299.         case DELIM_NUM:
  300.             scan_twenty_seven_bit_int();
  301.             break;
  302.  
  303.         default:
  304.             cur_val = -1;
  305.             break;
  306.         }
  307.     }
  308.     if (cur_val < 0) {
  309.         print_err("Missing delimiter (. inserted)");
  310.         help_delimiter();
  311.         back_error();
  312.         cur_val = 0;
  313.     }
  314.     small_fam(p) = (cur_val / 04000000) % 16;
  315.     small_char(p) = qi((cur_val / 010000) % 256);
  316.     large_fam(p) = (cur_val / 256) % 16;
  317.     large_char(p) = qi(cur_val % 256);
  318. }
  319.  
  320. math_radical ()
  321. {
  322.     tail_append(get_node(RADICAL_NOAD_SIZE));
  323.     type(tail) = RADICAL_NOAD;
  324.     subtype(tail) = NORMAL;
  325.     mem[nucleus(tail)].hh = empty_field;
  326.     mem[supscr(tail)].hh = empty_field;
  327.     mem[subscr(tail)].hh = empty_field;
  328.     scan_delimiter(left_delimiter(tail), TRUE);
  329.     scan_math(nucleus(tail));
  330. }
  331.  
  332. math_ac ()
  333. {
  334.     if (cur_cmd == ACCENT) {
  335.         print_err("Please use ");
  336.         print_esc("mathaccent");
  337.         print(" for accents in math mode");
  338.         help_math_accent();
  339.         error();
  340.     }
  341.     tail_append(get_node(ACCENT_NOAD_SIZE));
  342.     type(tail) = ACCENT_NOAD;
  343.     subtype(tail) = NORMAL;
  344.     mem[nucleus(tail)].hh = empty_field;
  345.     mem[subscr(tail)].hh = empty_field;
  346.     mem[supscr(tail)].hh = empty_field;
  347.     math_type(accent_chr(tail)) = MATH_CHAR;
  348.     scan_fifteen_bit_int();
  349.     character(accent_chr(tail)) = qi(cur_val % 256);
  350.     if (cur_val >= VAR_CODE && fam_in_range())
  351.         fam(accent_chr(tail)) = cur_fam;
  352.     else fam(accent_chr(tail)) = (cur_val / 256) % 16;
  353.     scan_math(nucleus(tail));
  354. }
  355.  
  356. append_choices ()
  357. {
  358.     tail_append(new_choice());
  359.     incr(save_ptr);
  360.     saved(-1) = 0;
  361.     scan_left_brace();
  362.     push_math(MATH_CHOICE_GROUP);
  363. }
  364.  
  365. build_choices ()
  366. {
  367.     ptr        p;
  368.  
  369.     unsave();
  370.     p = fin_mlist(NULL);
  371.     switch ((int) saved(-1))
  372.     {
  373.     case 0:
  374.         display_mlist(tail) = p;
  375.         break;
  376.  
  377.     case 1:
  378.         text_mlist(tail) = p;
  379.         break;
  380.  
  381.     case 2:
  382.         script_mlist(tail) = p;
  383.         break;
  384.  
  385.     case 3:
  386.         script_script_mlist(tail) = p;
  387.         decr(save_ptr);
  388.         return;
  389.     }
  390.     incr(saved(-1));
  391.     scan_left_brace();
  392.     push_math(MATH_CHOICE_GROUP);
  393. }
  394.  
  395. sub_sup ()
  396. {
  397.     ptr        p = NULL;
  398.     short    t = EMPTY;
  399.  
  400.     if (tail != head && scripts_allowed(tail)) {
  401.         p = supscr(tail) + cur_cmd - SUP_MARK;
  402.         t = math_type(p);
  403.     }
  404.     if (p == NULL || t != EMPTY) {
  405.         tail_append(new_noad());
  406.         p = supscr(tail) + cur_cmd - SUP_MARK;
  407.         if (t != EMPTY) {
  408.             if (cur_cmd == SUP_MARK) {
  409.                 print_err("Double superscript");
  410.                 help_double_sup();
  411.             } else {
  412.                 print_err("Double subscript");
  413.                 help_double_sub();
  414.             }
  415.             error();
  416.         }
  417.     }
  418.     scan_math(p);
  419. }
  420.  
  421. math_fraction ()
  422. {
  423.     int        c;
  424.  
  425.     c = cur_chr;
  426.     if (incompleat_noad != NULL) {
  427.         if (c >= DELIMITED_CODE) {
  428.             scan_delimiter(garbage, FALSE);
  429.             scan_delimiter(garbage, FALSE);
  430.         }
  431.         if (c % DELIMITED_CODE == ABOVE_CODE)
  432.             scan_normal_dimen();
  433.         print_err("Ambiguous; you need another { and }");
  434.         help_fraction();
  435.         error();
  436.     } else {
  437.         incompleat_noad = get_node(FRACTION_NOAD_SIZE);
  438.         type(incompleat_noad) = FRACTION_NOAD;
  439.         subtype(incompleat_noad) = NORMAL;
  440.         math_type(numerator(incompleat_noad)) = SUB_MLIST;
  441.         info(numerator(incompleat_noad)) = link(head);
  442.         mem[denominator(incompleat_noad)].hh = empty_field;
  443.         mem[left_delimiter(incompleat_noad)].qqqq = null_delimiter;
  444.         mem[right_delimiter(incompleat_noad)].qqqq = null_delimiter;
  445.         link(head) = NULL;
  446.         tail = head;
  447.         if (c >= DELIMITED_CODE) {
  448.             scan_delimiter(left_delimiter(incompleat_noad), FALSE);
  449.             scan_delimiter(right_delimiter(incompleat_noad), FALSE);
  450.         }
  451.         switch (c % DELIMITED_CODE)
  452.         {
  453.         case ABOVE_CODE:
  454.             scan_normal_dimen();
  455.             thickness(incompleat_noad) = cur_val;
  456.             break;
  457.  
  458.         case OVER_CODE:
  459.             thickness(incompleat_noad) = DEFAULT_CODE;
  460.             break;
  461.  
  462.         case ATOP_CODE:
  463.             thickness(incompleat_noad) = 0;
  464.             break;
  465.         }
  466.     }
  467. }
  468.  
  469. ptr
  470. fin_mlist (p)
  471.     ptr        p;
  472. {
  473.     ptr        q;
  474.  
  475.     if (incompleat_noad != NULL) {
  476.         math_type(denominator(incompleat_noad)) = SUB_MLIST;
  477.         info(denominator(incompleat_noad)) = link(head);
  478.         if (p == NULL)
  479.             q = incompleat_noad;
  480.         else {
  481.             q = info(numerator(incompleat_noad));
  482.             if (type(q) != LEFT_NOAD)
  483.                 confusion("right");
  484.             info(numerator(incompleat_noad)) = link(q);
  485.             link(q) = incompleat_noad;
  486.             link(incompleat_noad) = p;
  487.         }
  488.     } else {
  489.         link(tail) = p;
  490.         q = link(head);
  491.     }
  492.     pop_nest();
  493.     return q;
  494. }
  495.  
  496. math_left_right ()
  497. {
  498.     ptr        p;
  499.     int        t;
  500.  
  501.     t = cur_chr;
  502.     if (t == RIGHT_NOAD && cur_group != MATH_LEFT_GROUP) {
  503.         if (cur_group == MATH_SHIFT_GROUP) {
  504.             scan_delimiter(garbage, FALSE);
  505.             print_err("Extra ");
  506.             print_esc("right");
  507.             help_xtra_right();
  508.             error();
  509.         } else
  510.             off_save();
  511.     } else {
  512.         p = new_noad();
  513.         type(p) = t;
  514.         scan_delimiter(delimiter(p), FALSE);
  515.         if (t == LEFT_NOAD) {
  516.             push_math(MATH_LEFT_GROUP);
  517.             link(head) = p;
  518.             tail = p;
  519.         } else {
  520.             p = fin_mlist(p);
  521.             unsave();
  522.             tail_append(new_noad());
  523.             type(tail) = INNER_NOAD;
  524.             math_type(nucleus(tail)) = SUB_MLIST;
  525.             info(nucleus(tail)) = p;
  526.         }
  527.     }
  528. }
  529.  
  530. after_math ()
  531. {
  532.     ptr        a;
  533.     ptr        b;
  534.     scal    d;
  535.     scal    e;
  536.     bool    l;
  537.     int        m;
  538.     ptr        p;
  539.     scal    q;
  540.     ptr        r;
  541.     scal    s;
  542.     scal    t;
  543.     scal    w;
  544.     scal    z;
  545.     int        g1;
  546.     int        g2;
  547.     bool    danger;
  548.  
  549.     danger = FALSE;
  550.     if (font_params[fam_fnt(2 + TEXT_SIZE)] < TOTAL_MATHSY_PARAMS ||
  551.         font_params[fam_fnt(2 + SCRIPT_SIZE)] < TOTAL_MATHSY_PARAMS ||
  552.         font_params[fam_fnt(2 + SCRIPT_SCRIPT_SIZE)] < TOTAL_MATHSY_PARAMS) {
  553.         print_err("Math formula deleted: Insufficient symbol fonts");
  554.         help_math_sy();
  555.         error();
  556.         flush_math();
  557.         danger = TRUE;
  558.     } else if (font_params[fam_fnt(3 + TEXT_SIZE)] < TOTAL_MATHEX_PARAMS ||
  559.         font_params[fam_fnt(3 + SCRIPT_SIZE)] < TOTAL_MATHEX_PARAMS ||
  560.         font_params[fam_fnt(3 + SCRIPT_SCRIPT_SIZE)] < TOTAL_MATHEX_PARAMS) {
  561.         print_err("Math formula deleted: Insufficient extension fonts");
  562.         help_math_ex();
  563.         error();
  564.         flush_math();
  565.         danger = TRUE;
  566.     }
  567.     m = mode;
  568.     l = FALSE;
  569.     p = fin_mlist(NULL);
  570.     if (mode == -m) {
  571.         cur_mlist = p;
  572.         cur_style = TEXT_STYLE;
  573.         mlist_penalties = FALSE;
  574.         mlist_to_hlist();
  575.         a = hpack(link(temp_head), NATURAL);
  576.         unsave();
  577.         decr(save_ptr);
  578.         if (saved(0) == 1)
  579.             l = TRUE;
  580.         if (danger)
  581.             flush_math();
  582.         m = mode;
  583.         p = fin_mlist(NULL);
  584.     } else
  585.         a = NULL;
  586.     if (m < 0) {
  587.         tail_append(new_math(math_surround, BEFORE));
  588.         cur_mlist = p;
  589.         cur_style = TEXT_STYLE;
  590.         mlist_penalties = (mode > 0);
  591.         mlist_to_hlist();
  592.         link(tail) = link(temp_head);
  593.         while (link(tail) != NULL)
  594.             tail = link(tail);
  595.         tail_append(new_math(math_surround, AFTER));
  596.         space_factor = 1000;
  597.         unsave();
  598.     } else {
  599.         get_x_token();
  600.         if (cur_cmd != MATH_SHIFT) {
  601.             print_err("Display math should end with $$");
  602.             help_doldol();
  603.             back_error();
  604.         }
  605.         cur_mlist = p;
  606.         cur_style = DISPLAY_STYLE;
  607.         mlist_penalties = FALSE;
  608.         mlist_to_hlist();
  609.         p = link(temp_head);
  610.         adjust_tail = adjust_head;
  611.         b = hpack(p, NATURAL);
  612.         t = adjust_tail;
  613.         adjust_tail = NULL;
  614.         w = width(b);
  615.         z = display_width;
  616.         s = display_indent;
  617.         if (a == NULL || danger)
  618.             e = q = 0;
  619.         else {
  620.             e = width(a);
  621.             q = e + math_quad(TEXT_SIZE);
  622.         }
  623.         if (w + q > z) {
  624.             if (e != 0 &&
  625.                 (w - total_shrink[NORMAL] + q <= z ||
  626.                 total_shrink[FIL] != 0 ||
  627.                 total_shrink[FILL] != 0 ||
  628.                 total_shrink[FILLL] != 0)) {
  629.                 free_node(b, BOX_NODE_SIZE);
  630.                 b = hpack(p, z - q, EXACTLY);
  631.             } else {
  632.                 e = 0;
  633.                 if (w > z) {
  634.                     free_node(b, BOX_NODE_SIZE);
  635.                     b = hpack(p, z, EXACTLY);
  636.                 }
  637.             }
  638.             w = width(b);
  639.         }
  640.         d = half(z - w);
  641.         if (e > 0 && d < 2 * e) {
  642.             d = half(z - w - e);
  643.             if (p != NULL && type(p) == GLUE_NODE)
  644.                 d = 0;
  645.         }
  646.         tail_append(new_penalty(pre_display_penalty));
  647.         if (d + s <= pre_display_size || l) {
  648.             g1 = ABOVE_DISPLAY_SKIP_CODE;
  649.             g2 = BELOW_DISPLAY_SKIP_CODE;
  650.         } else {
  651.             g1 = ABOVE_DISPLAY_SHORT_SKIP_CODE;
  652.             g2 = BELOW_DISPLAY_SHORT_SKIP_CODE;
  653.         }
  654.         if (l && e == 0) {
  655.             shift_amount(a) = s;
  656.             append_to_vlist(a);
  657.             tail_append(new_penalty(INF_PENALTY));
  658.         } else
  659.             tail_append(new_param_glue(g1));
  660.         if (e != 0) {
  661.             r = new_kern(z - w - e - d);
  662.             if (l) {
  663.                 link(a) = r;
  664.                 link(r) = b;
  665.                 b = a;
  666.                 d = 0;
  667.             } else {
  668.                 link(b) = r;
  669.                 link(r) = a;
  670.             }
  671.             b = hpack(b, NATURAL);
  672.         }
  673.         shift_amount(b) = s + d;
  674.         append_to_vlist(b);
  675.         if (t != adjust_head) {
  676.             link(tail) = link(adjust_head);
  677.             tail = t;
  678.         }
  679.         if (a != NULL && e == 0 && !l) {
  680.             tail_append(new_penalty(INF_PENALTY));
  681.             shift_amount(a) = s + z - width(a);
  682.             append_to_vlist(a);
  683.             tail_append(new_penalty(post_display_penalty));
  684.         } else {
  685.             tail_append(new_penalty(post_display_penalty));
  686.             tail_append(new_param_glue(g2));
  687.         }
  688.         resume_after_display();
  689.     }
  690. }
  691.  
  692. resume_after_display ()
  693. {
  694.     if (cur_group != MATH_SHIFT_GROUP)
  695.         confusion("display");
  696.     unsave();
  697.     prev_graf += 3;
  698.     push_nest();
  699.     mode = HMODE;
  700.     space_factor = 1000;
  701.     scan_optional_space();
  702.     if (nest_ptr == 1) 
  703.         build_page();
  704. }
  705.  
  706. /*
  707.  *    Help text
  708.  */
  709.  
  710. help_math_accent ()
  711. {
  712.     help2("I'm changing \\accent to \\mathaccent here; wish me luck.",
  713.     "(Accents are not the same in formulas as they are in text.)" );
  714. }
  715.  
  716. help_math_sy ()
  717. {
  718.     help3("Sorry, but I can't typeset math unless \\textfont 2",
  719.     "and \\scriptfont 2 and \\scriptscriptfont 2 have all",
  720.     "the \\fontdimen values needed in math symbol fonts." );
  721. }
  722.  
  723. help_math_ex ()
  724. {
  725.     help3("Sorry, but I can't typeset math unless \\textfont 3",
  726.     "and \\scriptfont 3 and \\scriptscriptfont 3 have all",
  727.     "the \\fontdimen values needed in math extension fonts." );
  728. }
  729.  
  730. help_limits ()
  731. {
  732.     help1("I'm ignoring this misplaced \\limits or \\nolimits command.");
  733. }
  734.  
  735. help_delimiter ()
  736. {
  737.     help6("I was expecting to see something like `(' or `\\{' or",
  738.     "`\\}' here. If you typed, e.g., `{' instead of `\\{', you",
  739.     "should probably delete the `{' by typing `1' now, so that",
  740.     "braces don't get unbalanced. Otherwise just proceed.",
  741.     "Acceptable delimiters are characters whose \\delcode is",
  742.     "nonnegative, or you can use `\\delimiter <delimiter code>'.");
  743. }
  744.  
  745. help_fraction ()
  746. {
  747.     help3("I'm ignoring this fraction specification, since I don't",
  748.     "know whether a construction like `x \\over y \\over z'",
  749.     "means `{x \\over y} \\over z' or `x \\over {y \\over z}'.");
  750. }
  751.  
  752. help_xtra_right ()
  753. {
  754.     help1("I'm ignoring a \\right that had no matching \\left.");
  755. }
  756.  
  757. help_doldol ()
  758. {
  759.     help2("The `$' that I just saw supposedly matches a previous `$$'.",
  760.     "So I shall assume that you typed `$$' both times.");
  761. }
  762.  
  763. help_double_sub ()
  764. {
  765.     help1("I treat `x_1_2' essentially like `x_1{}_2'.");
  766. }
  767.  
  768. help_double_sup ()
  769. {
  770.     help1("I treat `x^1^2' essentially like `x^1{}^2'.");
  771. }
  772.